3.15 \(\int \frac {1+x^4}{1-2 x^4+x^8} \, dx\)

Optimal. Leaf size=27 \[ \frac {x}{2 \left (1-x^4\right )}+\frac {1}{4} \tan ^{-1}(x)+\frac {1}{4} \tanh ^{-1}(x) \]

[Out]

1/2*x/(-x^4+1)+1/4*arctan(x)+1/4*arctanh(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {28, 385, 212, 206, 203} \[ \frac {x}{2 \left (1-x^4\right )}+\frac {1}{4} \tan ^{-1}(x)+\frac {1}{4} \tanh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + x^4)/(1 - 2*x^4 + x^8),x]

[Out]

x/(2*(1 - x^4)) + ArcTan[x]/4 + ArcTanh[x]/4

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b), 2]
]}, Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&
 !GtQ[a/b, 0]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps

\begin {align*} \int \frac {1+x^4}{1-2 x^4+x^8} \, dx &=\int \frac {1+x^4}{\left (-1+x^4\right )^2} \, dx\\ &=\frac {x}{2 \left (1-x^4\right )}-\frac {1}{2} \int \frac {1}{-1+x^4} \, dx\\ &=\frac {x}{2 \left (1-x^4\right )}+\frac {1}{4} \int \frac {1}{1-x^2} \, dx+\frac {1}{4} \int \frac {1}{1+x^2} \, dx\\ &=\frac {x}{2 \left (1-x^4\right )}+\frac {1}{4} \tan ^{-1}(x)+\frac {1}{4} \tanh ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 31, normalized size = 1.15 \[ \frac {1}{8} \left (-\frac {4 x}{x^4-1}-\log (1-x)+\log (x+1)+2 \tan ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + x^4)/(1 - 2*x^4 + x^8),x]

[Out]

((-4*x)/(-1 + x^4) + 2*ArcTan[x] - Log[1 - x] + Log[1 + x])/8

________________________________________________________________________________________

fricas [B]  time = 0.61, size = 43, normalized size = 1.59 \[ \frac {2 \, {\left (x^{4} - 1\right )} \arctan \relax (x) + {\left (x^{4} - 1\right )} \log \left (x + 1\right ) - {\left (x^{4} - 1\right )} \log \left (x - 1\right ) - 4 \, x}{8 \, {\left (x^{4} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^8-2*x^4+1),x, algorithm="fricas")

[Out]

1/8*(2*(x^4 - 1)*arctan(x) + (x^4 - 1)*log(x + 1) - (x^4 - 1)*log(x - 1) - 4*x)/(x^4 - 1)

________________________________________________________________________________________

giac [A]  time = 0.52, size = 29, normalized size = 1.07 \[ -\frac {x}{2 \, {\left (x^{4} - 1\right )}} + \frac {1}{4} \, \arctan \relax (x) + \frac {1}{8} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{8} \, \log \left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^8-2*x^4+1),x, algorithm="giac")

[Out]

-1/2*x/(x^4 - 1) + 1/4*arctan(x) + 1/8*log(abs(x + 1)) - 1/8*log(abs(x - 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 42, normalized size = 1.56 \[ \frac {x}{4 x^{2}+4}+\frac {\arctan \relax (x )}{4}-\frac {\ln \left (x -1\right )}{8}+\frac {\ln \left (x +1\right )}{8}-\frac {1}{8 \left (x +1\right )}-\frac {1}{8 \left (x -1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+1)/(x^8-2*x^4+1),x)

[Out]

-1/8/(x+1)+1/8*ln(x+1)+1/4/(x^2+1)*x+1/4*arctan(x)-1/8/(x-1)-1/8*ln(x-1)

________________________________________________________________________________________

maxima [A]  time = 1.33, size = 27, normalized size = 1.00 \[ -\frac {x}{2 \, {\left (x^{4} - 1\right )}} + \frac {1}{4} \, \arctan \relax (x) + \frac {1}{8} \, \log \left (x + 1\right ) - \frac {1}{8} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^8-2*x^4+1),x, algorithm="maxima")

[Out]

-1/2*x/(x^4 - 1) + 1/4*arctan(x) + 1/8*log(x + 1) - 1/8*log(x - 1)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 21, normalized size = 0.78 \[ \frac {\mathrm {atan}\relax (x)}{4}+\frac {\mathrm {atanh}\relax (x)}{4}-\frac {x}{2\,\left (x^4-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4 + 1)/(x^8 - 2*x^4 + 1),x)

[Out]

atan(x)/4 + atanh(x)/4 - x/(2*(x^4 - 1))

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 26, normalized size = 0.96 \[ - \frac {x}{2 x^{4} - 2} - \frac {\log {\left (x - 1 \right )}}{8} + \frac {\log {\left (x + 1 \right )}}{8} + \frac {\operatorname {atan}{\relax (x )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**4+1)/(x**8-2*x**4+1),x)

[Out]

-x/(2*x**4 - 2) - log(x - 1)/8 + log(x + 1)/8 + atan(x)/4

________________________________________________________________________________________